<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   Java 正则表达式  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://dataunion.org/23888.html",
                  host: "http://dataunion.org",
                  prePath: "http://dataunion.org",
                  scheme: "http",
                  pathBase: "http://dataunion.org/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466457638: Accept with keywords: (title(0.333333333333):正则表达式,社区,数盟, topn(0.3):社区,数盟,编译,查找,先行,序号,表达式,结果,模式,对象,例子,可视化,文章,八进制,方法,模式匹配,范围,预测,正则表达式,空格,实例,字符串,字符,制表符,编程语言,错误,语法错误,括号,序列,文本).-->
 </head>
 <body onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    Java 正则表达式
   </h1>
  </div>
  <div class="container" id="xmain">
   ﻿﻿
   <title>
    Java 正则表达式 | 数盟社区
   </title>
   <!-- All in One SEO Pack 2.2.7.6.2 by Michael Torbert of Semper Fi Web Design[32,57] -->
   <!-- /all in one seo pack -->
   <!--
<div align="center">
<a href="http://strata.oreilly.com.cn/hadoop-big-data-cn?cmp=mp-data-confreg-home-stcn16_dataunion_pc" target="_blank"><img src="http://dataunion.org/wp-content/uploads/2016/05/stratabj.jpg"/ ></a>
</div>
-->
   <header id="header-web">
    <div class="header-main">
     <hgroup class="logo">
      <h1>
       <a href="http://dataunion.org/" rel="home" title="数盟社区">
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/logo.png"/>
       </a>
      </h1>
     </hgroup>
     <!--logo-->
     <nav class="header-nav">
      <ul class="menu" id="menu-%e4%b8%bb%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-71" id="menu-item-71">
        <a href="http://dataunion.org/category/events" title="events">
         活动
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22457" id="menu-item-22457">
          <a href="http://dataunion.org/2016timeline">
           2016档期
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22459" id="menu-item-22459">
          <a href="http://dataunion.org/category/parterc">
           合作会议
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor menu-item-has-children menu-item-20869" id="menu-item-20869">
        <a href="http://dataunion.org/category/tech" title="articles">
         文章
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20867" id="menu-item-20867">
          <a href="http://dataunion.org/category/tech/base" title="base">
           基础架构
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3302" id="menu-item-3302">
          <a href="http://dataunion.org/category/tech/ai" title="ai">
           人工智能
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3303" id="menu-item-3303">
          <a href="http://dataunion.org/category/tech/analysis" title="analysis">
           数据分析
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21920" id="menu-item-21920">
          <a href="http://dataunion.org/category/tech/dm">
           数据挖掘
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3314" id="menu-item-3314">
          <a href="http://dataunion.org/category/tech/viz" title="viz">
           可视化
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-3305" id="menu-item-3305">
          <a href="http://dataunion.org/category/tech/devl" title="devl">
           编程语言
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-20876" id="menu-item-20876">
        <a href="http://dataunion.org/category/industry">
         行业
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-16328" id="menu-item-16328">
          <a href="http://dataunion.org/category/industry/case" title="case">
           行业应用
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-2112" id="menu-item-2112">
          <a href="http://dataunion.org/category/industry/demo" title="demo">
           Demo展示
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21562" id="menu-item-21562">
          <a href="http://dataunion.org/category/industry/news">
           行业资讯
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-311" id="menu-item-311">
        <a href="http://dataunion.org/category/sources" title="sources">
         资源
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20870" id="menu-item-20870">
        <a href="http://dataunion.org/category/books" title="book">
         图书
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21363" id="menu-item-21363">
        <a href="http://dataunion.org/category/training">
         课程
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-21853" id="menu-item-21853">
        <a href="http://dataunion.org/category/jobs">
         职位
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22050" id="menu-item-22050">
          <a href="http://dataunion.org/category/career">
           职业规划
          </a>
         </li>
        </ul>
       </li>
      </ul>
     </nav>
     <!--header-nav-->
    </div>
   </header>
   <!--header-web-->
   <div id="main">
    <div id="soutab">
     <form action="http://dataunion.org/" class="search" method="get">
     </form>
    </div>
    <div id="container">
     <nav id="mbx">
      当前位置：
      <a href="http://dataunion.org">
       首页
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech">
       文章
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech/devl">
       编程语言
      </a>
      &gt;  正文
     </nav>
     <!--mbx-->
     <article class="content">
      <header align="centre" class="contenttitle">
       <div class="mscc">
        <h1 class="mscctitle">
         <a href="http://dataunion.org/23888.html">
          Java 正则表达式
         </a>
        </h1>
        <address class="msccaddress ">
         <em>
          434 次阅读 -
         </em>
         <a href="http://dataunion.org/category/tech/devl" rel="category tag">
          编程语言
         </a>
        </address>
       </div>
      </header>
      <div class="content-text">
       <p>
        正则表达式定义了字符串的模式。
       </p>
       <p>
        正则表达式可以用来搜索、编辑或处理文本。
       </p>
       <p>
        正则表达式并不仅限于某一种语言，但是在每种语言中有细微的差别。
       </p>
       <p>
        Java正则表达式和Perl的是最为相似的。
       </p>
       <p>
        java.util.regex包主要包括以下三个类：
       </p>
       <ul>
        <li>
         <strong>
          Pattern类：
         </strong>
         pattern对象是一个正则表达式的编译表示。Pattern类没有公共构造方法。要创建一个Pattern对象，你必须首先调用其公共静态编译方法，它返回一个Pattern对象。该方法接受一个正则表达式作为它的第一个参数。
        </li>
        <li>
         <strong>
          Matcher类：
         </strong>
         Matcher对象是对输入字符串进行解释和匹配操作的引擎。与Pattern类一样，Matcher也没有公共构造方法。你需要调用Pattern对象的matcher方法来获得一个Matcher对象。
        </li>
        <li>
         <strong>
          PatternSyntaxException：
         </strong>
         PatternSyntaxException是一个非强制异常类，它表示一个正则表达式模式中的语法错误。
        </li>
       </ul>
       <h2>
        捕获组
       </h2>
       <p>
        捕获组是把多个字符当一个单独单元进行处理的方法，它通过对括号内的字符分组来创建。
       </p>
       <p>
        例如，正则表达式(dog) 创建了单一分组，组里包含”d”，”o”，和”g”。
       </p>
       <p>
        捕获组是通过从左至右计算其开括号来编号。例如，在表达式（（A）（B（C））），有四个这样的组：
       </p>
       <ul class="list">
        <li>
         ((A)(B(C)))
        </li>
        <li>
         (A)
        </li>
        <li>
         (B(C))
        </li>
        <li>
         (C)
        </li>
       </ul>
       <p>
        可以通过调用matcher对象的groupCount方法来查看表达式有多少个分组。groupCount方法返回一个int值，表示matcher对象当前有多个捕获组。
       </p>
       <p>
        还有一个特殊的组（组0），它总是代表整个表达式。该组不包括在groupCount的返回值中。
       </p>
       <h2>
        实例
       </h2>
       <p>
        下面的例子说明如何从一个给定的字符串中找到数字串：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685e22154a4199070377" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <span class="crayon-language">
           Java
          </span>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegexMatches
{
    public static void main( String args[] ){

      // 按指定模式在字符串查找
      String line = "This order was placed for QT3000! OK?";
      String pattern = "(.*)(\\d+)(.*)";

      // 创建 Pattern 对象
      Pattern r = Pattern.compile(pattern);

      // 现在创建 matcher 对象
      Matcher m = r.matcher(line);
      if (m.find( )) {
         System.out.println("Found value: " + m.group(0) );
         System.out.println("Found value: " + m.group(1) );
         System.out.println("Found value: " + m.group(2) );
      } else {
         System.out.println("NO MATCH");
      }
   }
}
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57685e22154a4199070377-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154a4199070377-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154a4199070377-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154a4199070377-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154a4199070377-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154a4199070377-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154a4199070377-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154a4199070377-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154a4199070377-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154a4199070377-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154a4199070377-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154a4199070377-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154a4199070377-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154a4199070377-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154a4199070377-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154a4199070377-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154a4199070377-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154a4199070377-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154a4199070377-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154a4199070377-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154a4199070377-21">
               21
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154a4199070377-22">
               22
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154a4199070377-23">
               23
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154a4199070377-24">
               24
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154a4199070377-25">
               25
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57685e22154a4199070377-1">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                util
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                regex
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                Matcher
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154a4199070377-2">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                util
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                regex
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                Pattern
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154a4199070377-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154a4199070377-4">
               <span class="crayon-m">
                public
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                RegexMatches
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154a4199070377-5">
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154a4199070377-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                public
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                void
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                args
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154a4199070377-7">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154a4199070377-8">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // 按指定模式在字符串查找
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154a4199070377-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                line
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "This order was placed for QT3000! OK?"
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154a4199070377-10">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "(.*)(\\d+)(.*)"
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154a4199070377-11">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154a4199070377-12">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // 创建 Pattern 对象
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154a4199070377-13">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Pattern
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                r
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Pattern
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154a4199070377-14">
              </div>
              <div class="crayon-line" id="crayon-57685e22154a4199070377-15">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // 现在创建 matcher 对象
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154a4199070377-16">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Matcher
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                m
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                r
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                matcher
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                line
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154a4199070377-17">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                m
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                find
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154a4199070377-18">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                System
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                out
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                println
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "Found value: "
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                m
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154a4199070377-19">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                System
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                out
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                println
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "Found value: "
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                m
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154a4199070377-20">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                System
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                out
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                println
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "Found value: "
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                m
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                2
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154a4199070377-21">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154a4199070377-22">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                System
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                out
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                println
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "NO MATCH"
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154a4199070377-23">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154a4199070377-24">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154a4199070377-25">
               <span class="crayon-sy">
                }
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0472 seconds] -->
       <p>
       </p>
       <p>
        以上实例编译运行结果如下：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685e22154b9563543302" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <span class="crayon-language">
           Java
          </span>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          Found value: This order was placed for QT3000! OK?
Found value: This order was placed for QT300
Found value: 0
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57685e22154b9563543302-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154b9563543302-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154b9563543302-3">
               3
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57685e22154b9563543302-1">
               <span class="crayon-e">
                Found
               </span>
               <span class="crayon-v">
                value
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                This
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                order
               </span>
               <span class="crayon-e">
                was
               </span>
               <span class="crayon-e">
                placed
               </span>
               <span class="crayon-st">
                for
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                QT3000
               </span>
               <span class="crayon-o">
                !
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                OK
               </span>
               <span class="crayon-sy">
                ?
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154b9563543302-2">
               <span class="crayon-e">
                Found
               </span>
               <span class="crayon-v">
                value
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                This
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                order
               </span>
               <span class="crayon-e">
                was
               </span>
               <span class="crayon-e">
                placed
               </span>
               <span class="crayon-st">
                for
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                QT300
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154b9563543302-3">
               <span class="crayon-e">
                Found
               </span>
               <span class="crayon-v">
                value
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0050 seconds] -->
       <p>
       </p>
       <h2>
        正则表达式语法
       </h2>
       <table class="reference">
        <tbody>
         <tr>
          <th>
           字符
          </th>
          <th>
           说明
          </th>
         </tr>
         <tr>
          <td>
           \
          </td>
          <td>
           将下一字符标记为特殊字符、文本、反向引用或八进制转义符。例如，”n”匹配字符”n”。”\n”匹配换行符。序列”\\”匹配”\”，”\(“匹配”(“。
          </td>
         </tr>
         <tr>
          <td>
           ^
          </td>
          <td>
           匹配输入字符串开始的位置。如果设置了
           <b>
            RegExp
           </b>
           对象的
           <b>
            Multiline
           </b>
           属性，^ 还会与”\n”或”\r”之后的位置匹配。
          </td>
         </tr>
         <tr>
          <td>
           $
          </td>
          <td>
           匹配输入字符串结尾的位置。如果设置了
           <b>
            RegExp
           </b>
           对象的
           <b>
            Multiline
           </b>
           属性，$ 还会与”\n”或”\r”之前的位置匹配。
          </td>
         </tr>
         <tr>
          <td>
           *
          </td>
          <td>
           零次或多次匹配前面的字符或子表达式。例如，zo* 匹配”z”和”zoo”。* 等效于 {0,}。
          </td>
         </tr>
         <tr>
          <td>
           +
          </td>
          <td>
           一次或多次匹配前面的字符或子表达式。例如，”zo+”与”zo”和”zoo”匹配，但与”z”不匹配。+ 等效于 {1,}。
          </td>
         </tr>
         <tr>
          <td>
           ?
          </td>
          <td>
           零次或一次匹配前面的字符或子表达式。例如，”do(es)?”匹配”do”或”does”中的”do”。? 等效于 {0,1}。
          </td>
         </tr>
         <tr>
          <td>
           {
           <i>
            n
           </i>
           }
          </td>
          <td>
           <i>
            n
           </i>
           是非负整数。正好匹配
           <i>
            n
           </i>
           次。例如，”o{2}”与”Bob”中的”o”不匹配，但与”food”中的两个”o”匹配。
          </td>
         </tr>
         <tr>
          <td>
           {
           <i>
            n
           </i>
           ,}
          </td>
          <td>
           <i>
            n
           </i>
           是非负整数。至少匹配
           <i>
            n
           </i>
           次。例如，”o{2,}”不匹配”Bob”中的”o”，而匹配”foooood”中的所有 o。”o{1,}”等效于”o+”。”o{0,}”等效于”o*”。
          </td>
         </tr>
         <tr>
          <td>
           {
           <i>
            n
           </i>
           ,
           <i>
            m
           </i>
           }
          </td>
          <td>
           <i>
            M
           </i>
           和
           <i>
            n
           </i>
           是非负整数，其中
           <i>
            n
           </i>
           &lt;=
           <i>
            m
           </i>
           。匹配至少
           <i>
            n
           </i>
           次，至多
           <i>
            m
           </i>
           次。例如，”o{1,3}”匹配”fooooood”中的头三个 o。’o{0,1}’ 等效于 ‘o?’。注意：您不能将空格插入逗号和数字之间。
          </td>
         </tr>
         <tr>
          <td>
           ?
          </td>
          <td>
           当此字符紧随任何其他限定符（*、+、?、{
           <i>
            n
           </i>
           }、{
           <i>
            n
           </i>
           ,}、{
           <i>
            n
           </i>
           ,
           <i>
            m
           </i>
           }）之后时，匹配模式是”非贪心的”。”非贪心的”模式匹配搜索到的、尽可能短的字符串，而默认的”贪心的”模式匹配搜索到的、尽可能长的字符串。例如，在字符串”oooo”中，”o+?”只匹配单个”o”，而”o+”匹配所有”o”。
          </td>
         </tr>
         <tr>
          <td>
           .
          </td>
          <td>
           匹配除”\r\n”之外的任何单个字符。若要匹配包括”\r\n”在内的任意字符，请使用诸如”[\s\S]”之类的模式。
          </td>
         </tr>
         <tr>
          <td>
           (
           <i>
            pattern
           </i>
           )
          </td>
          <td>
           匹配
           <i>
            pattern
           </i>
           并捕获该匹配的子表达式。可以使用
           <b>
            $0…$9
           </b>
           属性从结果”匹配”集合中检索捕获的匹配。若要匹配括号字符 ( )，请使用”\(“或者”\)”。
          </td>
         </tr>
         <tr>
          <td>
           (?:
           <i>
            pattern
           </i>
           )
          </td>
          <td>
           匹配
           <i>
            pattern
           </i>
           但不捕获该匹配的子表达式，即它是一个非捕获匹配，不存储供以后使用的匹配。这对于用”or”字符 (|) 组合模式部件的情况很有用。例如，’industr(?:y|ies) 是比 ‘industry|industries’ 更经济的表达式。
          </td>
         </tr>
         <tr>
          <td>
           (?=
           <i>
            pattern
           </i>
           )
          </td>
          <td>
           执行正向预测先行搜索的子表达式，该表达式匹配处于匹配
           <i>
            pattern
           </i>
           的字符串的起始点的字符串。它是一个非捕获匹配，即不能捕获供以后使用的匹配。例如，’Windows (?=95|98|NT|2000)’ 匹配”Windows 2000″中的”Windows”，但不匹配”Windows 3.1″中的”Windows”。预测先行不占用字符，即发生匹配后，下一匹配的搜索紧随上一匹配之后，而不是在组成预测先行的字符后。
          </td>
         </tr>
         <tr>
          <td>
           (?!
           <i>
            pattern
           </i>
           )
          </td>
          <td>
           执行反向预测先行搜索的子表达式，该表达式匹配不处于匹配
           <i>
            pattern
           </i>
           的字符串的起始点的搜索字符串。它是一个非捕获匹配，即不能捕获供以后使用的匹配。例如，’Windows (?!95|98|NT|2000)’ 匹配”Windows 3.1″中的 “Windows”，但不匹配”Windows 2000″中的”Windows”。预测先行不占用字符，即发生匹配后，下一匹配的搜索紧随上一匹配之后，而不是在组成预测先行的字符后。
          </td>
         </tr>
         <tr>
          <td>
           <i>
            x
           </i>
           |
           <i>
            y
           </i>
          </td>
          <td>
           匹配
           <i>
            x
           </i>
           或
           <i>
            y
           </i>
           。例如，’z|food’ 匹配”z”或”food”。'(z|f)ood’ 匹配”zood”或”food”。
          </td>
         </tr>
         <tr>
          <td>
           [
           <i>
            xyz
           </i>
           ]
          </td>
          <td>
           字符集。匹配包含的任一字符。例如，”[abc]”匹配”plain”中的”a”。
          </td>
         </tr>
         <tr>
          <td>
           [^
           <i>
            xyz
           </i>
           ]
          </td>
          <td>
           反向字符集。匹配未包含的任何字符。例如，”[^abc]”匹配”plain”中”p”，”l”，”i”，”n”。
          </td>
         </tr>
         <tr>
          <td>
           [
           <i>
            a-z
           </i>
           ]
          </td>
          <td>
           字符范围。匹配指定范围内的任何字符。例如，”[a-z]”匹配”a”到”z”范围内的任何小写字母。
          </td>
         </tr>
         <tr>
          <td>
           [^
           <i>
            a-z
           </i>
           ]
          </td>
          <td>
           反向范围字符。匹配不在指定的范围内的任何字符。例如，”[^a-z]”匹配任何不在”a”到”z”范围内的任何字符。
          </td>
         </tr>
         <tr>
          <td>
           \b
          </td>
          <td>
           匹配一个字边界，即字与空格间的位置。例如，”er\b”匹配”never”中的”er”，但不匹配”verb”中的”er”。
          </td>
         </tr>
         <tr>
          <td>
           \B
          </td>
          <td>
           非字边界匹配。”er\B”匹配”verb”中的”er”，但不匹配”never”中的”er”。
          </td>
         </tr>
         <tr>
          <td>
           \c
           <i>
            x
           </i>
          </td>
          <td>
           匹配
           <i>
            x
           </i>
           指示的控制字符。例如，\cM 匹配 Control-M 或回车符。
           <i>
            x
           </i>
           的值必须在 A-Z 或 a-z 之间。如果不是这样，则假定 c 就是”c”字符本身。
          </td>
         </tr>
         <tr>
          <td>
           \d
          </td>
          <td>
           数字字符匹配。等效于 [0-9]。
          </td>
         </tr>
         <tr>
          <td>
           \D
          </td>
          <td>
           非数字字符匹配。等效于 [^0-9]。
          </td>
         </tr>
         <tr>
          <td>
           \f
          </td>
          <td>
           换页符匹配。等效于 \x0c 和 \cL。
          </td>
         </tr>
         <tr>
          <td>
           \n
          </td>
          <td>
           换行符匹配。等效于 \x0a 和 \cJ。
          </td>
         </tr>
         <tr>
          <td>
           \r
          </td>
          <td>
           匹配一个回车符。等效于 \x0d 和 \cM。
          </td>
         </tr>
         <tr>
          <td>
           \s
          </td>
          <td>
           匹配任何空白字符，包括空格、制表符、换页符等。与 [ \f\n\r\t\v] 等效。
          </td>
         </tr>
         <tr>
          <td>
           \S
          </td>
          <td>
           匹配任何非空白字符。与 [^ \f\n\r\t\v] 等效。
          </td>
         </tr>
         <tr>
          <td>
           \t
          </td>
          <td>
           制表符匹配。与 \x09 和 \cI 等效。
          </td>
         </tr>
         <tr>
          <td>
           \v
          </td>
          <td>
           垂直制表符匹配。与 \x0b 和 \cK 等效。
          </td>
         </tr>
         <tr>
          <td>
           \w
          </td>
          <td>
           匹配任何字类字符，包括下划线。与”[A-Za-z0-9_]”等效。
          </td>
         </tr>
         <tr>
          <td>
           \W
          </td>
          <td>
           与任何非单词字符匹配。与”[^A-Za-z0-9_]”等效。
          </td>
         </tr>
         <tr>
          <td>
           \x
           <i>
            n
           </i>
          </td>
          <td>
           匹配
           <i>
            n
           </i>
           ，此处的
           <i>
            n
           </i>
           是一个十六进制转义码。十六进制转义码必须正好是两位数长。例如，”\x41″匹配”A”。”\x041″与”\x04″&amp;”1″等效。允许在正则表达式中使用 ASCII 代码。
          </td>
         </tr>
         <tr>
          <td>
           \
           <i>
            num
           </i>
          </td>
          <td>
           匹配
           <i>
            num
           </i>
           ，此处的
           <i>
            num
           </i>
           是一个正整数。到捕获匹配的反向引用。例如，”(.)\1″匹配两个连续的相同字符。
          </td>
         </tr>
         <tr>
          <td>
           \
           <i>
            n
           </i>
          </td>
          <td>
           标识一个八进制转义码或反向引用。如果 \
           <i>
            n
           </i>
           前面至少有
           <i>
            n
           </i>
           个捕获子表达式，那么
           <i>
            n
           </i>
           是反向引用。否则，如果
           <i>
            n
           </i>
           是八进制数 (0-7)，那么
           <i>
            n
           </i>
           是八进制转义码。
          </td>
         </tr>
         <tr>
          <td>
           \
           <i>
            nm
           </i>
          </td>
          <td>
           标识一个八进制转义码或反向引用。如果 \
           <i>
            nm
           </i>
           前面至少有
           <i>
            nm
           </i>
           个捕获子表达式，那么
           <i>
            nm
           </i>
           是反向引用。如果 \
           <i>
            nm
           </i>
           前面至少有
           <i>
            n
           </i>
           个捕获，则
           <i>
            n
           </i>
           是反向引用，后面跟有字符
           <i>
            m
           </i>
           。如果两种前面的情况都不存在，则 \
           <i>
            nm
           </i>
           匹配八进制值
           <i>
            nm
           </i>
           ，其中
           <i>
            n
           </i>
           和
           <i>
            m
           </i>
           是八进制数字 (0-7)。
          </td>
         </tr>
         <tr>
          <td>
           \
           <span class="parameter">
            nml
           </span>
          </td>
          <td>
           当
           <i>
            n
           </i>
           是八进制数 (0-3)，
           <i>
            m
           </i>
           和
           <i>
            l
           </i>
           是八进制数 (0-7) 时，匹配八进制转义码
           <i>
            nml
           </i>
           。
          </td>
         </tr>
         <tr>
          <td>
           \u
           <i>
            n
           </i>
          </td>
          <td>
           匹配
           <i>
            n
           </i>
           ，其中
           <i>
            n
           </i>
           是以四位十六进制数表示的 Unicode 字符。例如，\u00A9 匹配版权符号 (©)。
          </td>
         </tr>
        </tbody>
       </table>
       <h2>
        Mather类的方法
       </h2>
       <h2>
        索引方法
       </h2>
       <p>
        索引方法提供了有用的索引值，精确表明输入字符串中在哪能找到匹配：
       </p>
       <table class="reference">
        <tbody>
         <tr>
          <th>
           <strong>
            序号
           </strong>
          </th>
          <th>
           <strong>
            方法及说明
           </strong>
          </th>
         </tr>
         <tr>
          <td>
           1
          </td>
          <td>
           <strong>
            public int start()
           </strong>
           <br/>
           返回以前匹配的初始索引。
          </td>
         </tr>
         <tr>
          <td>
           2
          </td>
          <td>
           <strong>
            public int start(int group)
           </strong>
           <br/>
           返回在以前的匹配操作期间，由给定组所捕获的子序列的初始索引
          </td>
         </tr>
         <tr>
          <td>
           3
          </td>
          <td>
           <strong>
            public int end()
           </strong>
           <br/>
           返回最后匹配字符之后的偏移量。
          </td>
         </tr>
         <tr>
          <td>
           4
          </td>
          <td>
           <strong>
            public int end(int group)
           </strong>
           <br/>
           返回在以前的匹配操作期间，由给定组所捕获子序列的最后字符之后的偏移量。
          </td>
         </tr>
        </tbody>
       </table>
       <h2>
        研究方法
       </h2>
       <p>
        研究方法用来检查输入字符串并返回一个布尔值，表示是否找到该模式：
       </p>
       <table class="reference">
        <tbody>
         <tr>
          <th>
           <strong>
            序号
           </strong>
          </th>
          <th>
           <strong>
            方法及说明
           </strong>
          </th>
         </tr>
         <tr>
          <td>
           1
          </td>
          <td>
           <strong>
            public boolean lookingAt()
           </strong>
           <br/>
           尝试将从区域开头开始的输入序列与该模式匹配。
          </td>
         </tr>
         <tr>
          <td>
           2
          </td>
          <td>
           <strong>
            public boolean find()
           </strong>
           <br/>
           尝试查找与该模式匹配的输入序列的下一个子序列。
          </td>
         </tr>
         <tr>
          <td>
           3
          </td>
          <td>
           <strong>
            public boolean find(int start
           </strong>
           <strong>
            ）
           </strong>
           <br/>
           重置此匹配器，然后尝试查找匹配该模式、从指定索引开始的输入序列的下一个子序列。
          </td>
         </tr>
         <tr>
          <td>
           4
          </td>
          <td>
           <strong>
            public boolean matches()
           </strong>
           <br/>
           尝试将整个区域与模式匹配。
          </td>
         </tr>
        </tbody>
       </table>
       <h2>
        替换方法
       </h2>
       <p>
        替换方法是替换输入字符串里文本的方法：
       </p>
       <table class="reference">
        <tbody>
         <tr>
          <th>
           <strong>
            序号
           </strong>
          </th>
          <th>
           <strong>
            方法及说明
           </strong>
          </th>
         </tr>
         <tr>
          <td>
           1
          </td>
          <td>
           <strong>
            public Matcher appendReplacement(StringBuffer sb, String replacement)
           </strong>
           <br/>
           实现非终端添加和替换步骤。
          </td>
         </tr>
         <tr>
          <td>
           2
          </td>
          <td>
           <strong>
            public StringBuffer appendTail(StringBuffer sb)
           </strong>
           <br/>
           实现终端添加和替换步骤。
          </td>
         </tr>
         <tr>
          <td>
           3
          </td>
          <td>
           <strong>
            public String replaceAll(String replacement)
           </strong>
           <br/>
           替换模式与给定替换字符串相匹配的输入序列的每个子序列。
          </td>
         </tr>
         <tr>
          <td>
           4
          </td>
          <td>
           <strong>
            public String replaceFirst(String replacement)
           </strong>
           <br/>
           替换模式与给定替换字符串匹配的输入序列的第一个子序列。
          </td>
         </tr>
         <tr>
          <td>
           5
          </td>
          <td>
           <strong>
            public static String quoteReplacement(String s)
           </strong>
           <br/>
           返回指定字符串的字面替换字符串。这个方法返回一个字符串，就像传递给Matcher类的appendReplacement 方法一个字面字符串一样工作。
          </td>
         </tr>
        </tbody>
       </table>
       <h2>
        start 和end 方法
       </h2>
       <p>
        下面是一个对单词”cat”出现在输入字符串中出现次数进行计数的例子：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685e22154e2230108291" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <span class="crayon-language">
           Java
          </span>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegexMatches
{
    private static final String REGEX = "\\bcat\\b";
    private static final String INPUT =
                                    "cat cat cat cattie cat";

    public static void main( String args[] ){
       Pattern p = Pattern.compile(REGEX);
       Matcher m = p.matcher(INPUT); // 获取 matcher 对象
       int count = 0;

       while(m.find()) {
         count++;
         System.out.println("Match number "+count);
         System.out.println("start(): "+m.start());
         System.out.println("end(): "+m.end());
      }
   }
}
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57685e22154e2230108291-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154e2230108291-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154e2230108291-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154e2230108291-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154e2230108291-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154e2230108291-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154e2230108291-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154e2230108291-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154e2230108291-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154e2230108291-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154e2230108291-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154e2230108291-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154e2230108291-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154e2230108291-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154e2230108291-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154e2230108291-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154e2230108291-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154e2230108291-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154e2230108291-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154e2230108291-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154e2230108291-21">
               21
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154e2230108291-22">
               22
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57685e22154e2230108291-1">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                util
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                regex
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                Matcher
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154e2230108291-2">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                util
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                regex
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                Pattern
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154e2230108291-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154e2230108291-4">
               <span class="crayon-m">
                public
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                RegexMatches
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154e2230108291-5">
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154e2230108291-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                private
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                final
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                REGEX
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "\\bcat\\b"
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154e2230108291-7">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                private
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                final
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                INPUT
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154e2230108291-8">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "cat cat cat cattie cat"
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154e2230108291-9">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154e2230108291-10">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                public
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                void
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                args
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154e2230108291-11">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Pattern
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                p
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Pattern
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                REGEX
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154e2230108291-12">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Matcher
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                m
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                p
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                matcher
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                INPUT
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // 获取 matcher 对象
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154e2230108291-13">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                int
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                count
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154e2230108291-14">
              </div>
              <div class="crayon-line" id="crayon-57685e22154e2230108291-15">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                while
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                m
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                find
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154e2230108291-16">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                count
               </span>
               <span class="crayon-o">
                ++
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154e2230108291-17">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                System
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                out
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                println
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "Match number "
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-v">
                count
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154e2230108291-18">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                System
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                out
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                println
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "start(): "
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-v">
                m
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                start
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154e2230108291-19">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                System
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                out
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                println
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "end(): "
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-v">
                m
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-st">
                end
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154e2230108291-20">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154e2230108291-21">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154e2230108291-22">
               <span class="crayon-sy">
                }
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0086 seconds] -->
       <p>
       </p>
       <p>
        以上实例编译运行结果如下：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685e22154f7628687722" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <span class="crayon-language">
           Java
          </span>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          Match number 1
start(): 0
end(): 3
Match number 2
start(): 4
end(): 7
Match number 3
start(): 8
end(): 11
Match number 4
start(): 19
end(): 22
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57685e22154f7628687722-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154f7628687722-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154f7628687722-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154f7628687722-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154f7628687722-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154f7628687722-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154f7628687722-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154f7628687722-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154f7628687722-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154f7628687722-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154f7628687722-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154f7628687722-12">
               12
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57685e22154f7628687722-1">
               <span class="crayon-e">
                Match
               </span>
               <span class="crayon-i">
                number
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154f7628687722-2">
               <span class="crayon-e">
                start
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154f7628687722-3">
               <span class="crayon-st">
                end
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                3
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154f7628687722-4">
               <span class="crayon-e">
                Match
               </span>
               <span class="crayon-i">
                number
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                2
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154f7628687722-5">
               <span class="crayon-e">
                start
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                4
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154f7628687722-6">
               <span class="crayon-st">
                end
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                7
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154f7628687722-7">
               <span class="crayon-e">
                Match
               </span>
               <span class="crayon-i">
                number
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                3
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154f7628687722-8">
               <span class="crayon-e">
                start
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                8
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154f7628687722-9">
               <span class="crayon-st">
                end
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                11
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154f7628687722-10">
               <span class="crayon-e">
                Match
               </span>
               <span class="crayon-i">
                number
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                4
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154f7628687722-11">
               <span class="crayon-e">
                start
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                19
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154f7628687722-12">
               <span class="crayon-st">
                end
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                22
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0026 seconds] -->
       <p>
       </p>
       <p>
        可以看到这个例子是使用单词边界，以确保字母 “c” “a” “t” 并非仅是一个较长的词的子串。它也提供了一些关于输入字符串中匹配发生位置的有用信息。
       </p>
       <p>
        Start方法返回在以前的匹配操作期间，由给定组所捕获的子序列的初始索引，end方法最后一个匹配字符的索引加1。
       </p>
       <h2>
        matches 和lookingAt 方法
       </h2>
       <p>
        matches 和lookingAt 方法都用来尝试匹配一个输入序列模式。它们的不同是matcher要求整个序列都匹配，而lookingAt 不要求。
       </p>
       <p>
        这两个方法经常在输入字符串的开始使用。
       </p>
       <p>
        我们通过下面这个例子，来解释这个功能：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685e22154ff489819188" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <span class="crayon-language">
           Java
          </span>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegexMatches
{
    private static final String REGEX = "foo";
    private static final String INPUT = "fooooooooooooooooo";
    private static Pattern pattern;
    private static Matcher matcher;

    public static void main( String args[] ){
       pattern = Pattern.compile(REGEX);
       matcher = pattern.matcher(INPUT);

       System.out.println("Current REGEX is: "+REGEX);
       System.out.println("Current INPUT is: "+INPUT);

       System.out.println("lookingAt(): "+matcher.lookingAt());
       System.out.println("matches(): "+matcher.matches());
   }
}
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57685e22154ff489819188-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154ff489819188-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154ff489819188-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154ff489819188-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154ff489819188-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154ff489819188-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154ff489819188-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154ff489819188-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154ff489819188-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154ff489819188-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154ff489819188-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154ff489819188-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154ff489819188-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154ff489819188-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154ff489819188-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154ff489819188-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154ff489819188-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154ff489819188-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154ff489819188-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e22154ff489819188-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-57685e22154ff489819188-21">
               21
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57685e22154ff489819188-1">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                util
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                regex
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                Matcher
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154ff489819188-2">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                util
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                regex
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                Pattern
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154ff489819188-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154ff489819188-4">
               <span class="crayon-m">
                public
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                RegexMatches
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154ff489819188-5">
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154ff489819188-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                private
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                final
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                REGEX
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "foo"
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154ff489819188-7">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                private
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                final
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                INPUT
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "fooooooooooooooooo"
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154ff489819188-8">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                private
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Pattern
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154ff489819188-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                private
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Matcher
               </span>
               <span class="crayon-v">
                matcher
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154ff489819188-10">
              </div>
              <div class="crayon-line" id="crayon-57685e22154ff489819188-11">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                public
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                void
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                args
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154ff489819188-12">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Pattern
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                REGEX
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154ff489819188-13">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                matcher
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                matcher
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                INPUT
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154ff489819188-14">
              </div>
              <div class="crayon-line" id="crayon-57685e22154ff489819188-15">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                System
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                out
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                println
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "Current REGEX is: "
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-v">
                REGEX
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154ff489819188-16">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                System
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                out
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                println
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "Current INPUT is: "
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-v">
                INPUT
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154ff489819188-17">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154ff489819188-18">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                System
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                out
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                println
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "lookingAt(): "
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-v">
                matcher
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                lookingAt
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154ff489819188-19">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                System
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                out
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                println
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "matches(): "
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-v">
                matcher
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                matches
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e22154ff489819188-20">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e22154ff489819188-21">
               <span class="crayon-sy">
                }
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0071 seconds] -->
       <p>
       </p>
       <p>
        以上实例编译运行结果如下：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685e2215506952716526" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <span class="crayon-language">
           Java
          </span>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          Current REGEX is: foo
Current INPUT is: fooooooooooooooooo
lookingAt(): true
matches(): false
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57685e2215506952716526-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e2215506952716526-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57685e2215506952716526-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e2215506952716526-4">
               4
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57685e2215506952716526-1">
               <span class="crayon-e">
                Current
               </span>
               <span class="crayon-e">
                REGEX
               </span>
               <span class="crayon-st">
                is
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                foo
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e2215506952716526-2">
               <span class="crayon-e">
                Current
               </span>
               <span class="crayon-e">
                INPUT
               </span>
               <span class="crayon-st">
                is
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                fooooooooooooooooo
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e2215506952716526-3">
               <span class="crayon-e">
                lookingAt
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                true
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e2215506952716526-4">
               <span class="crayon-e">
                matches
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                false
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0011 seconds] -->
       <p>
       </p>
       <h2>
        replaceFirst 和replaceAll 方法
       </h2>
       <p>
        replaceFirst 和replaceAll 方法用来替换匹配正则表达式的文本。不同的是，replaceFirst 替换首次匹配，replaceAll 替换所有匹配。
       </p>
       <p>
        下面的例子来解释这个功能：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685e221550d624417921" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <span class="crayon-language">
           Java
          </span>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegexMatches
{
    private static String REGEX = "dog";
    private static String INPUT = "The dog says meow. " +
                                    "All dogs say meow.";
    private static String REPLACE = "cat";

    public static void main(String[] args) {
       Pattern p = Pattern.compile(REGEX);
       // get a matcher object
       Matcher m = p.matcher(INPUT); 
       INPUT = m.replaceAll(REPLACE);
       System.out.println(INPUT);
   }
}
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57685e221550d624417921-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221550d624417921-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57685e221550d624417921-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221550d624417921-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57685e221550d624417921-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221550d624417921-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57685e221550d624417921-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221550d624417921-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57685e221550d624417921-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221550d624417921-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57685e221550d624417921-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221550d624417921-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-57685e221550d624417921-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221550d624417921-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-57685e221550d624417921-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221550d624417921-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-57685e221550d624417921-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221550d624417921-18">
               18
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57685e221550d624417921-1">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                util
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                regex
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                Matcher
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221550d624417921-2">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                util
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                regex
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                Pattern
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e221550d624417921-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221550d624417921-4">
               <span class="crayon-m">
                public
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                RegexMatches
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e221550d624417921-5">
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221550d624417921-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                private
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                REGEX
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "dog"
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e221550d624417921-7">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                private
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                INPUT
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "The dog says meow. "
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                +
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221550d624417921-8">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "All dogs say meow."
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e221550d624417921-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                private
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                REPLACE
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "cat"
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221550d624417921-10">
              </div>
              <div class="crayon-line" id="crayon-57685e221550d624417921-11">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                public
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                void
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                args
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221550d624417921-12">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Pattern
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                p
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Pattern
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                REGEX
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e221550d624417921-13">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // get a matcher object
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221550d624417921-14">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Matcher
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                m
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                p
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                matcher
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                INPUT
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e221550d624417921-15">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                INPUT
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                m
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                replaceAll
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                REPLACE
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221550d624417921-16">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                System
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                out
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                println
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                INPUT
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e221550d624417921-17">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221550d624417921-18">
               <span class="crayon-sy">
                }
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0066 seconds] -->
       <p>
       </p>
       <p>
        以上实例编译运行结果如下：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685e2215513097793674" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <span class="crayon-language">
           Java
          </span>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          The cat says meow. All cats say meow.
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57685e2215513097793674-1">
               1
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57685e2215513097793674-1">
               <span class="crayon-e">
                The
               </span>
               <span class="crayon-e">
                cat
               </span>
               <span class="crayon-e">
                says
               </span>
               <span class="crayon-v">
                meow
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                All
               </span>
               <span class="crayon-e">
                cats
               </span>
               <span class="crayon-e">
                say
               </span>
               <span class="crayon-v">
                meow
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0007 seconds] -->
       <p>
       </p>
       <h2>
        appendReplacement 和 appendTail 方法
       </h2>
       <p>
        Matcher 类也提供了appendReplacement 和appendTail 方法用于文本替换：
       </p>
       <p>
        看下面的例子来解释这个功能：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685e221551c774308252" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <span class="crayon-language">
           Java
          </span>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegexMatches
{
   private static String REGEX = "a*b";
   private static String INPUT = "aabfooaabfooabfoob";
   private static String REPLACE = "-";
   public static void main(String[] args) {
      Pattern p = Pattern.compile(REGEX);
      // 获取 matcher 对象
      Matcher m = p.matcher(INPUT);
      StringBuffer sb = new StringBuffer();
      while(m.find()){
         m.appendReplacement(sb,REPLACE);
      }
      m.appendTail(sb);
      System.out.println(sb.toString());
   }
}
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57685e221551c774308252-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221551c774308252-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57685e221551c774308252-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221551c774308252-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57685e221551c774308252-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221551c774308252-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57685e221551c774308252-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221551c774308252-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57685e221551c774308252-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221551c774308252-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57685e221551c774308252-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221551c774308252-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-57685e221551c774308252-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221551c774308252-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-57685e221551c774308252-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221551c774308252-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-57685e221551c774308252-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221551c774308252-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-57685e221551c774308252-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685e221551c774308252-20">
               20
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57685e221551c774308252-1">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                util
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                regex
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                Matcher
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221551c774308252-2">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                util
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                regex
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                Pattern
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e221551c774308252-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221551c774308252-4">
               <span class="crayon-m">
                public
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                RegexMatches
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e221551c774308252-5">
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221551c774308252-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                private
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                REGEX
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "a*b"
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e221551c774308252-7">
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                private
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                INPUT
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "aabfooaabfooabfoob"
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221551c774308252-8">
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                private
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                REPLACE
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "-"
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e221551c774308252-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                public
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                static
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                void
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                args
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221551c774308252-10">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Pattern
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                p
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Pattern
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                REGEX
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e221551c774308252-11">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // 获取 matcher 对象
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221551c774308252-12">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                Matcher
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                m
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                p
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                matcher
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                INPUT
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e221551c774308252-13">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                StringBuffer
               </span>
               <span class="crayon-v">
                sb
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                StringBuffer
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221551c774308252-14">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                while
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                m
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                find
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e221551c774308252-15">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                m
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                appendReplacement
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                sb
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                REPLACE
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221551c774308252-16">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e221551c774308252-17">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                m
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                appendTail
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                sb
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221551c774308252-18">
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                System
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                out
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                println
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                sb
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                toString
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685e221551c774308252-19">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685e221551c774308252-20">
               <span class="crayon-sy">
                }
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0072 seconds] -->
       <p>
       </p>
       <p>
        以上实例编译运行结果如下：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685e2215523648688729" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <span class="crayon-language">
           Java
          </span>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          -foo-foo-foo-
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57685e2215523648688729-1">
               1
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57685e2215523648688729-1">
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                foo
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                foo
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                foo
               </span>
               <span class="crayon-o">
                -
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0005 seconds] -->
       <p>
       </p>
       <h2>
        PatternSyntaxException 类的方法
       </h2>
       <p>
        PatternSyntaxException 是一个非强制异常类，它指示一个正则表达式模式中的语法错误。
       </p>
       <p>
        PatternSyntaxException 类提供了下面的方法来帮助我们查看发生了什么错误。
       </p>
       <table class="reference">
        <tbody>
         <tr>
          <th>
           <strong>
            序号
           </strong>
          </th>
          <th>
           <strong>
            方法及说明
           </strong>
          </th>
         </tr>
         <tr>
          <td>
           1
          </td>
          <td>
           <strong>
            public String getDescription()
           </strong>
           <br/>
           获取错误的描述。
          </td>
         </tr>
         <tr>
          <td>
           2
          </td>
          <td>
           <strong>
            public int getIndex()
           </strong>
           <br/>
           获取错误的索引。
          </td>
         </tr>
         <tr>
          <td>
           3
          </td>
          <td>
           <strong>
            public String getPattern()
           </strong>
           <br/>
           获取错误的正则表达式模式。
          </td>
         </tr>
         <tr>
          <td>
           4
          </td>
          <td>
           <strong>
            public String getMessage()
           </strong>
           <br/>
           返回多行字符串，包含语法错误及其索引的描述、错误的正则表达式模式和模式中错误索引的可视化指示。
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <div>
       <strong>
        注：转载文章均来自于公开网络，仅供学习使用，不会用于任何商业用途，如果侵犯到原作者的权益，请您与我们联系删除或者授权事宜，联系邮箱：contact@dataunion.org。转载数盟网站文章请注明原文章作者，否则产生的任何版权纠纷与数盟无关。
       </strong>
      </div>
      <!--content_text-->
      <div class="fenxian">
       <!-- JiaThis Button BEGIN -->
       <div class="jiathis_style_32x32">
        <p class="jiathis_button_weixin">
        </p>
        <p class="jiathis_button_tsina">
        </p>
        <p class="jiathis_button_qzone">
        </p>
        <p class="jiathis_button_cqq">
        </p>
        <p class="jiathis_button_tumblr">
        </p>
        <a class="jiathis jiathis_txt jtico jtico_jiathis" href="http://www.jiathis.com/share" target="_blank">
        </a>
        <p class="jiathis_counter_style">
        </p>
       </div>
       <!-- JiaThis Button END -->
      </div>
     </article>
     <!--content-->
     <!--相关文章-->
     <div class="xianguan">
      <div class="xianguantitle">
       相关文章！
      </div>
      <ul class="pic">
       <li>
        <a href="http://dataunion.org/24678.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/20140917125452915416-216x200.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/24678.html" rel="bookmark" title="python3中的正则模块">
         python3中的正则模块
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/24675.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/t015b337bd75d9ef893-161x200.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/24675.html" rel="bookmark" title="注释是恶魔，请不要再写一行注释">
         注释是恶魔，请不要再写一行注释
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/24660.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/u16130037972892789947fm21gp0-300x157.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/24660.html" rel="bookmark" title="如何从Github上轻松安装R包">
         如何从Github上轻松安装R包
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/24654.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/df53fac99fc53ba5a90666abcca25e6d_b-267x200.png"/>
        </a>
        <a class="link" href="http://dataunion.org/24654.html" rel="bookmark" title="简单形象又有趣地说说强大的神经网络">
         简单形象又有趣地说说强大的神经网络
        </a>
       </li>
      </ul>
     </div>
     <!--相关文章-->
     <div class="comment" id="comments">
      <!-- You can start editing here. -->
      <!-- If comments are open, but there are no comments. -->
      <div class="title">
       期待你一针见血的评论，Come on！
      </div>
      <div id="respond">
       <p>
        不用想啦，马上
        <a href="http://dataunion.org/wp-login.php?redirect_to=http%3A%2F%2Fdataunion.org%2F23888.html">
         "登录"
        </a>
        发表自已的想法.
       </p>
      </div>
     </div>
     <!-- .nav-single -->
    </div>
    <!--Container End-->
    <aside id="sitebar">
     <div class="sitebar_list2">
      <div class="wptag">
       <span class="tagtitle">
        热门标签+
       </span>
       <div class="tagg">
        <ul class="menu" id="menu-%e5%8f%8b%e6%83%85%e9%93%be%e6%8e%a5">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1605" id="menu-item-1605">
          <a href="http://taidizh.com/">
           泰迪智慧
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20884" id="menu-item-20884">
          <a href="http://www.transwarp.cn/">
           星环科技
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3538" id="menu-item-3538">
          <a href="http://datall.org/">
           珈和遥感
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20888" id="menu-item-20888">
          <a href="http://www.chinahadoop.cn/">
           小象学院
          </a>
         </li>
        </ul>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <div class="textwidget">
       <div align="center">
        <a href="http://study.163.com/course/courseMain.htm?courseId=991022" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2016/03/dv.jpg"/>
        </a>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       文章分类
      </h4>
      <div class="tagcloud">
       <a class="tag-link-44" href="http://dataunion.org/category/industry/demo" style="font-size: 10.204724409449pt;" title="4个话题">
        Demo展示
       </a>
       <a class="tag-link-31" href="http://dataunion.org/category/experts" style="font-size: 15.826771653543pt;" title="52个话题">
        专家团队
       </a>
       <a class="tag-link-870" href="http://dataunion.org/category/tech/ai" style="font-size: 19.795275590551pt;" title="273个话题">
        人工智能
       </a>
       <a class="tag-link-488" href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f" style="font-size: 8pt;" title="1个话题">
        加入数盟
       </a>
       <a class="tag-link-869" href="http://dataunion.org/category/tech/viz" style="font-size: 17.204724409449pt;" title="93个话题">
        可视化
       </a>
       <a class="tag-link-30" href="http://dataunion.org/category/partners" style="font-size: 10.645669291339pt;" title="5个话题">
        合作伙伴
       </a>
       <a class="tag-link-889" href="http://dataunion.org/category/parterc" style="font-size: 11.582677165354pt;" title="8个话题">
        合作会议
       </a>
       <a class="tag-link-104" href="http://dataunion.org/category/books" style="font-size: 12.96062992126pt;" title="15个话题">
        图书
       </a>
       <a class="tag-link-220" href="http://dataunion.org/category/tech/base" style="font-size: 19.850393700787pt;" title="281个话题">
        基础架构
       </a>
       <a class="tag-link-219" href="http://dataunion.org/category/tech/analysis" style="font-size: 19.409448818898pt;" title="232个话题">
        数据分析
       </a>
       <a class="tag-link-887" href="http://dataunion.org/category/tech/dm" style="font-size: 13.291338582677pt;" title="17个话题">
        数据挖掘
       </a>
       <a class="tag-link-34" href="http://dataunion.org/category/tech" style="font-size: 20.732283464567pt;" title="404个话题">
        文章
       </a>
       <a class="tag-link-1" href="http://dataunion.org/category/uncategorized" style="font-size: 22pt;" title="693个话题">
        未分类
       </a>
       <a class="tag-link-4" href="http://dataunion.org/category/events" style="font-size: 14.503937007874pt;" title="29个话题">
        活动
       </a>
       <a class="tag-link-890" href="http://dataunion.org/category/tech/%e6%b7%b1%e5%ba%a6%e5%ad%a6%e4%b9%a0" style="font-size: 10.204724409449pt;" title="4个话题">
        深度学习
       </a>
       <a class="tag-link-221" href="http://dataunion.org/category/tech/devl" style="font-size: 18.968503937008pt;" title="193个话题">
        编程语言
       </a>
       <a class="tag-link-888" href="http://dataunion.org/category/career" style="font-size: 15.661417322835pt;" title="48个话题">
        职业规划
       </a>
       <a class="tag-link-5" href="http://dataunion.org/category/jobs" style="font-size: 14.11811023622pt;" title="25个话题">
        职位
       </a>
       <a class="tag-link-871" href="http://dataunion.org/category/industry" style="font-size: 15.716535433071pt;" title="49个话题">
        行业
       </a>
       <a class="tag-link-613" href="http://dataunion.org/category/industry/case" style="font-size: 16.984251968504pt;" title="84个话题">
        行业应用
       </a>
       <a class="tag-link-885" href="http://dataunion.org/category/industry/news" style="font-size: 17.425196850394pt;" title="102个话题">
        行业资讯
       </a>
       <a class="tag-link-10" href="http://dataunion.org/category/training" style="font-size: 14.228346456693pt;" title="26个话题">
        课程
       </a>
       <a class="tag-link-16" href="http://dataunion.org/category/sources" style="font-size: 15.661417322835pt;" title="48个话题">
        资源
       </a>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       功能
      </h4>
      <ul>
       <li>
        <a href="http://dataunion.org/wp-login.php?action=register">
         注册
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/wp-login.php">
         登录
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/feed">
         文章
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/comments/feed">
         评论
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="https://cn.wordpress.org/" title="基于WordPress，一个优美、先进的个人信息发布平台。">
         WordPress.org
        </a>
       </li>
      </ul>
     </div>
    </aside>
    <div class="clear">
    </div>
   </div>
   <!--main-->
   ﻿
   <footer id="dibu">
    <div class="about">
     <div class="right">
      <ul class="menu" id="menu-%e5%ba%95%e9%83%a8%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-18024" id="menu-item-18024">
        <a href="http://dataunion.org/category/partners">
         合作伙伴
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20881" id="menu-item-20881">
        <a href="http://dataunion.org/contribute">
         文章投稿
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20872" id="menu-item-20872">
        <a href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f">
         加入数盟
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22441" id="menu-item-22441">
        <a href="http://dataunion.org/f-links">
         友情链接
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20874" id="menu-item-20874">
        <a href="http://dataunion.org/aboutus">
         关于数盟
        </a>
       </li>
      </ul>
      <p class="banquan">
       数盟社区        ，
        做最棒的数据科学社区
      </p>
     </div>
     <div class="left">
      <ul class="bottomlist">
       <li>
        <a href="http://weibo.com/DataScientistUnion  " target="_blank" 　title="">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weibo.png"/>
        </a>
       </li>
       <li>
        <a class="cd-popup-trigger" href="http://dataunion.org/23888.html#0">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weixin.png"/>
        </a>
       </li>
      </ul>
      <div class="cd-popup">
       <div class="cd-popup-container">
        <h1>
         扫描二维码,加微信公众号
        </h1>
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/2014-12-06-1515289049.png"/>
        <a class="cd-popup-close" href="http://dataunion.org/23888.html">
        </a>
       </div>
       <!-- cd-popup-container -->
      </div>
      <!-- cd-popup -->
     </div>
    </div>
    <!--about-->
    <div class="bottom">
     <a href="http://dataunion.org/">
      数盟社区
     </a>
     <a href="http://www.miitbeian.gov.cn/" rel="external nofollow" target="_blank">
      京ICP备14026740号
     </a>
     联系我们：
     <a href="mailto:contact@dataunion.org" target="_blank">
      contact@dataunion.org
     </a>
     <div class="tongji">
     </div>
     <!--bottom-->
     <div class="scroll" id="scroll" style="display:none;">
      ︿
     </div>
    </div>
   </footer>
   <!--dibu-->
  </div>
 </body>
</html>